<!DOCTYPE html>
<html lang="cn" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>互联网村镇管理平台</title>
    <link rel="stylesheet" type="text/css" th:href="@{/css/common.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{/css/main.css}"/>
    <div th:include="admin/common/common"></div>
    <script type="text/javascript" charset="utf-8" th:src="@{/js/libs/ckeditor/ckeditor.js}"></script>
    <script type="text/javascript" th:src="@{/js/libs/ajaxfileupload.js}"></script>
    <script type="text/javascript" th:src="@{/js/web/comm/commInfo.js}"></script>
</head>
<body>
<div class="container clearfix">
    <div class="main-wrap">
        <div class="crumb-wrap">
            <div class="crumb-list">
                <i class="icon-font">&#xe9b7;</i>
                <a href="javascript:void(0);">信息管理</a>
                <span class="crumb-step">&gt;</span>
                <span class="crumb-name">修改信息</span>
            </div>
        </div>
        <div class="result-wrap">
            <div class="result-content">
                <form id="editCommInfoForm" onsubmit="return excuteEditCommInfo();">
                    <input type="hidden" id="infoId" name="infoId" th:value="${commInfo?.infoId}"/>
                    <table class="insert-tab" width="100%">
                        <tbody>
                        <tr>
                            <th style="width:10%;">
                                <i class="require-red">*</i>
                                信息标题：
                            </th>
                            <td>
                                <input class="common-text required" id="title" name="title" style="width:99%" th:value="${commInfo?.title}"
                                       maxlength="50" type="text"/>
                            </td>
                        </tr>
                        <tr>
                            <th style="width:10%;">
                                <i class="require-red">*</i>
                                信息简介：
                            </th>
                            <td>
                                <input class="common-text required" id="desc" name="desc" style="width:99%" th:value="${commInfo?.desc}"
                                       maxlength="128" type="text"/>
                            </td>
                        </tr>
                        <tr>
                            <th style="width:10%;">
                                <i class="require-red">*</i>
                                信息内容：
                            </th>
                            <td>
                                <textarea id="oldContent" style="display: none;" th:text="${commInfo?.content}"></textarea>
                                <textarea name="content_editor" id="content_editor" rows="10" cols="80">
					            </textarea>
                                <script>
                                    CKEDITOR.replace('content_editor', {allowedContent:true, filebrowserImageUploadUrl: shiro.baseUrl + "uploadCKEditor",
                                    	toolbar : 'Full',
							            filebrowserFlashUploadUrl :shiro.baseUrl+"uploadVideo"})
                                </script>
                            </td>
                        </tr>
                        <tr>
                            <th style="width:10%;">
                                <i class="require-red">*</i>
                                缩略图片：
                            </th>
                            <td>
                                <div class="uploadPicture">
                                    <img id="pictureImg" th:src="${thumbnail}" width="106" height="122" alt="缩略图片"/>
                                    <input type="file" onchange="uploadPicture();" id="pictureFile" style="display:none;" name="pictureFile"/>
                                    <input type="hidden" id="picture" th:value="${commInfo?.thumbnail}" />
                                    <a href="javascript:void(0);" id="uploadPictureLink">上传图片</a>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <th></th>
                            <td>
                                <input class="btn btn-primary btn6 mr10" value="提交" type="submit"/>
                                <input class="btn btn6" onclick="history.go(-1)" value="返回" type="button"/>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </form>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    CKEDITOR.instances.content_editor.setData($('#oldContent').val());
</script>
</body>
</html>